/* 
 * File:   PS2Keyboard.h
 * Author: frank
 *
 * Created on November 23, 2014, 8:58 PM
 */

#ifndef PS2KEYBOARD_H
#define	PS2KEYBOARD_H

// This module will control the Keyboard and receive the data.
// However, it will not translate the keys to characters.
// Use the call back to get the key pressed or released.
// Once this module is working one more called PS2Translation will be
// created to get charcters from scan codes.

// Up to 3 bytes may be sent by keyboard for one key.
typedef void (*KeyPressReleaseCallback)(unsigned char code1, unsigned char code2, unsigned char code3);

void ResetKeyboard();   // Returns 0xAA for pass test
void Echo();            // Returns 0xEE
void SetScanCodeSet();
void GetScanCodeSet();
void IdentifyDevice();  // 0,1, or 2 return bytes. Disable scanning to do this.
void EnableScanning();
void DisableScanning();
void SetToDefaults();
void SetTypematicRateDelay();
void ResendLastByte();
void SetLED();

void SetCallback(KeyPressReleaseCallback callbackFunction);


#endif	/* PS2KEYBOARD_H */

